package com.woniuxy.business.controller;

import com.woniuxy.business.service.impl.BankServiceImpl;
import com.woniuxy.entity.Bank;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/bank")
public class BankController {
    @Resource
    private BankServiceImpl bankService;

    //根据id查找银行信息
    @GetMapping("find/{id}")
    public Bank getBank(@PathVariable("id")int id){
        return bankService.getBankById(id);
    }

}
